﻿<%@ Page Language="C#" MasterPageFile="~/Home/HomePage.master" AutoEventWireup="true"
    CodeFile="MyFavorite.aspx.cs" Inherits="Home_MyFavorite" %>

<%@ Import Namespace="Shopping.Common" %>
<%@ Import Namespace="Shopping.Model" %>
<asp:Content ID="Head" ContentPlaceHolderID="Head" runat="Server">
    <title>我的关注</title>
    <script type="text/javascript" src="/JsBase/jquery.js"></script>
    <script type="text/javascript" src="/home/Js/MyFavorite.js"></script>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="Content" runat="Server">
     <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table2">
                  <tr  class="HeadTitle">
                  <th align="center">商品图片</th>
                  <th align="left">&nbsp;&nbsp;商品名称</th>
                  <th align="center">销售价格</th>
                  <th align="center">收藏日期</th>
                  <th align="center">管理</th>
                  </tr>

                  <%
                      if (listOfFav != null)
                      {
                          for (int i = 0; i < listOfFav.Count; ++i)
                          {
                              UserFavoriteInfo l = listOfFav[i];
                   %>
                   
                  <tr >
                  <td align="center" ><a href="/Goods/<%=l.Goods.BaseInfo.GoodsID %>.html" target="_blank"><img src="<%=l.Goods.MainPicture.SuperSmallPictureUrl %>" /></a></td>
                  <td align="left">&nbsp;&nbsp;<a href="/Goods/<%=l.Goods.BaseInfo.GoodsID %>.html" target="_blank"><%=l.Goods.BaseInfo.GoodsName%>(<%=l.Goods.PackUnit %>)<%=!string.IsNullOrEmpty(l.Goods.BaseInfo.Promotions)?"("+l.Goods.BaseInfo.Promotions+")":"" %></a></td>
                  <td align="center" class="red_bold"><%=Utility.FormatMoneyStr(l.Goods.BaseInfo.SalePrice)%>元</td>
                  
                  <td align="center" ><%=l.FavoriteInfo.CollectDate.ToString("yyyy-MM-dd") %></td>
                  <td align="center" ><a href="javascript:void(0);" onclick="PutInShoppingCart(<%=l.FavoriteInfo.GoodsID %>)" class="green">加入购物车</a> <a href="javascript:void(0);" onclick="CancelFav('<%=l.FavoriteInfo.GoodsID %>');" class="green">移除</a></td>
                
                  </tr>
                  <%}
                      
                      }
                      else
                      { %>

              <tr>
                  <td align="center" class="pl5" colspan="5">[  您还没有关注任何商品！]</td>
              </tr>
              <%} %>
              </table>
              <br />
</asp:Content>
